package com.njit.mailm.core.dao;

import com.njit.mailm.core.bean.User;

public interface UserDao {
	void saveUser(User user) throws Exception;

	/**
	 * 通过username查找user
	 * @param username
	 * @return
	 */
	User findUserByUsername(String username);

	/**
	 * 将username对应的isauth改为1
	 * 
	 * @param username
	 * @throws Exception
	 */
	void setAuth(String username) throws Exception;

	/**
	 * 通过username和password查找是否有匹配的用户
	 * @param user 用户对象，username，password属性有值
	 * @return 用户对象，如果没有找到返回null
     */
	User getUserByUandP(User user);
}
